import service from "./request"

//学生管理
export function studentGetPage(params, page) {
    return service({
        url: '/admin/student/page/' + page,
        method: 'get',
        params: params
    })
}


// 学生页数
export function studentGetPageCount(params) {
    return service({
        url: '/admin/student/page/count',
        method: 'get',
        params: params
    })
}

// 学生添加
export function studentAdd(data) {
    return service({
        url: '/admin/student',
        method: 'post',
        data: data
    })
}
//删除学生
export function studentDelete(id) {
    return service({
        url: '/admin/student/' + id,
        method: 'delete',
    })
}
//获取班级名
export function className() {
    return service({
        url: "/admin/class/names",
        method: "get"
    })
}
//根据id获取学生
export function studentInfo(id) {
    return service({
        url: '/admin/student/' + id,
        method: 'get',
    })
}
//编辑
export function studentEdit(data) {
    return service({
        url: '/admin/student',
        method: 'put',
        data: data
    })
}





